package com.witte.serviceImp;

import com.witte.dao.OfferMapper;
import com.witte.entity.Offer;
import com.witte.entity.Product;
import com.witte.service.OfferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class OfferServiceImp implements OfferService {
    @Autowired(required=false)
    OfferMapper offerMapper;
    @Override
    public List<Offer> selectForPage(Integer beginPage, Integer pageSize) {
        int begin = (beginPage-1)*pageSize;
        return offerMapper.selectForPage(begin,pageSize);
    }


    @Override
    public int getCount() {
        return offerMapper.getAllCount();
    }
}
